<?php

class PropertyTest{

    protected $name = "string";


    public function __get(string $key) {
        return $this->$key;
    }

    public function __set(string $key, string $name) {
        $this->$key = $name;
    }

    public function __isset(string $key) {
        return isset($this->$key);
    }


}


$obj = new PropertyTest();

echo $obj->name;

echo $obj->name = "hj";
echo $obj->name;


var_dump(isset($obj->name));
?>
